package com.qf.smsplatform.service.Impl;
/*2021/11/4*/

import com.qf.smsplatform.constans.ResultCode;
import com.qf.smsplatform.exception.AddDataException;
import com.qf.smsplatform.exception.UpdateDataException;
import com.qf.smsplatform.mapper.TMultipleParamsMapper;
import com.qf.smsplatform.pojo.CheckType;
import com.qf.smsplatform.pojo.TMultipleParams;
import com.qf.smsplatform.service.TMultipleParamsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.xml.transform.Result;

/**
 * @YuTao
 */
@Service
@Transactional
public class TMultipleParamsServiceImpl implements TMultipleParamsService {

    private TMultipleParamsMapper tMultipleParamsMapper;
    @Autowired
    public void settMultipleParamsMapper(TMultipleParamsMapper tMultipleParamsMapper) {
        this.tMultipleParamsMapper = tMultipleParamsMapper;
    }

    @Override
    public void updateTMultParams(TMultipleParams tMultipleParams) {
        if(tMultipleParams.isNull(CheckType.UPDATE)){
            throw new UpdateDataException("传递的修改参数不正确", ResultCode.DATA_ISNULL);
        }
        tMultipleParamsMapper.updateTMultParams(tMultipleParams);
    }
}
